home *** CD-ROM | disk | FTP | other *** search
/ Logiciels PC Special 3 / Logiciel PC - Hors-Serie 3.iso / Logs / arcade / retro11 / DOCS / RETRO.FAQ < prev    next >
Text File  |  1998-12-03  |  42KB  |  1,086 lines

  1. Retrocade - Version 1.1
  2. Frequently Asked Questions
  3.  
  4. ------------
  5.  
  6. This document is designed to answer the frequently asked questions with
  7. regard to all versions of Retrocade. DOS/Windows/UNIX/Mac specific sections
  8. will be indicated by those tags in parenthesis.
  9.  
  10. ------------
  11.  
  12. * Section 1 - General Retrocade Questions
  13.  
  14. 1-1. Why does Armor Attack flicker sometimes?
  15. 1-2. Why does Demon flicker really badly?
  16. 1-3. How can I make a given game fit better with the screen?
  17. 1-4. I get "Game 'x' not supported no matter what I do. What's wrong?
  18. 1-5. Some games have sound and some don't. Why?
  19. 1-6. Asteroids runs too fast
  20. 1-7. How can I alter the speed that a game is playing?
  21. 1-8. Where do I stick the ROM images?
  22. 1-9. Where do I stick the .PAK files?
  23. 1-10. I've modified my defctrls.ini file to make changes to the emulator's
  24.       assignments, but nothing changes when I try the altered game again.
  25. 1-11. I'm really offended by the splash screen. How can I get rid of it?
  26. 1-12. How can I get screeshots of my game in progress?
  27. 1-13. What do the fields in the performance monitor actually mean?
  28. 1-14. Why don't you provide a way to have a smaller sampling rate to increase
  29.       game emulation speed?
  30. 1-15. I want to use my own sample files with Retrocade. Can I do that?
  31. 1-16. Why doesn't game 'x' save my high scores?
  32. 1-17. Retrocade shows the correct fps, but the game is running too fast.
  33. 1-18. Why doesn't Retrocade support all ROM revisions of a particular game?
  34. 1-19. Wouldn't it be better/faster to break Retrocade up into smaller programs?
  35. 1-20. Why are the games that use antialiasing and translucent vectors so much
  36.       slower than the rest?
  37. 1-21. Why I can't turn the brightness all the way down to black?
  38. 1-22. What are the minimum requirements for all games to run full speed with
  39.       Retrocade?
  40. 1-23. Why can't I set the FPS lower than 20?
  41. 1-24. What is Retrocade's purpose?
  42. 1-25. Why did you choose JPG over GIF or some other format for screenshots?
  43. 1-26. The Williams games (Bubbles, Stargate, etc...) just sit there looking
  44.       at me with "Factory settings restored" on the screen and won't start.
  45.       What do I do to get it to go?
  46. 1-27. I'd like to squish/expand the vector games - especially Tempest. Is this
  47.       possible?
  48. 1-28. I want to modify the in-game controls to my own custom settings. How can
  49.       I do this?
  50. 1-29. Does Retrocade support multiple ROM pathnames? I have my ROMs in several
  51.       different subdirectories.
  52. 1-30. I get [CTRL=Failed] each time I try to start Retrocade. Why?
  53. 1-31. Game 'x' doesn't work properly with my Gamepad. What's wrong?
  54. 1-32. I get an assertion in games.c when I try to run Retrocade 1.1.
  55.  
  56. * Section 2 - Platform specific Retrocade questions
  57.  
  58. 2-1. Why can't I get any backdrops with any of the games that support it?
  59. 2-2. I get no sound in *ANY* games. Why?
  60. 2-3. I get a black screen whenever I try to run any game in Retrocade, or the
  61.      machine locks up.
  62. 2-4. Is Retrocade (DOS) supposed to run under Windows?
  63. 2-5. Retrocade doesn't see my mouse/Wingman Warrior. Why?
  64. 2-6. The onscreen display does not come up at all when I hit F5. Why?
  65. 2-7. Retrocade isn't as fast as everyone makes it out to be on my machine, but
  66.      everyone else seems to be having great success. Why is my machine slower
  67.      than people with equivalent or lesser powered machines?
  68. 2-8. Retrocade crashes almost immediately on startup with "Loading..." with
  69.      a general proection fault. What's wrong?
  70. 2-9. My Logitech Wingman Warrior spinner doesn't work, but the Wingman itself
  71.      works just fine.
  72. 2-10. What video card(s) do you recommend for Retrocade for a PC?
  73. 2-11. My Microsoft Sidewinder Gamepad doesn't work when I'm running Retrocade
  74.       in a DOS box under Windows. Why not?
  75. 2-12. I get "Unable to copy screen contents into clipboard" whenever I try to
  76.       get a screenshot.
  77. 2-13. Does Retrocade support scanlines?
  78. 2-14. Why can't Retrocade deal with interrupts higher than IRQ 7?
  79.  
  80. --------
  81.  
  82. Q1-1. Why does Armor Attack flicker sometimes?
  83.  
  84. A. That is how the original game operated. This is normal.
  85.  
  86. --------
  87.  
  88. Q1-2. Why does Demon flicker really badly?
  89.  
  90. A. That is how the original game operated. This is normal.
  91.  
  92. --------
  93.  
  94. Q1-3. How can I make a given game fit better with the screen?
  95.  
  96. A. Try enabling the tweaked mode support (256x256, 224x288, and 288x224)
  97. with the -tweak on/off parameter (DOS). These modes are not included by 
  98. default since they can be problematic, and performance in these modes is not
  99. optimal. The -tweak command is sticky, so you only need to issue it once
  100. and it will stick from that point on.
  101.  
  102. --------
  103.  
  104. Q1-4. I get "Game 'x' not supported no matter what I do. What's wrong?
  105.  
  106. A. Several possibilities. Make sure you're launching Retrocade with:
  107. retro -g "game name", with the full game's name - NOT THE ZIP filename. If
  108. the game is multi-worded, make sure you use quotes! Make sure that you have
  109. the appropriate ZIP file for the game you want to run in either the current
  110. directory where the Retrocade executable is launched, or in the subdirectory
  111. where you have -romdir pointing. Make sure your ZIP archive is good, by
  112. doing a pkunzip -v zipfile.zip on the game in question.
  113.  
  114. If you have any questions about what Retrocade finds, use the -romlist
  115. option to emit a romlist.txt file. It will indicate any missing files and
  116. what Retrocade is looking for.
  117.  
  118. --------
  119.  
  120. Q1-5. Some games have sound and some don't. Why?
  121.  
  122. A. The easy answer is some games do have sound engines in them, and some
  123. don't. Retrocade is a continuing work in progress, and thusly everything
  124. isn't complete.
  125.  
  126. Some games require samples, too. Do you have the appropriate sample files
  127. (.PAK) for the games in question (if they exist)? Check the Retrocade
  128. homepage at (www.retrocade.com) for the appropriate .PAK files. If you have
  129. a corrupt .PAK file for any given game, the sound effects will not load up
  130. or make any sound at all. You also may have an older .PAK file. Check the
  131. size on the www.retrocade.com web site to ensure that what you have is
  132. the correct size, and is also the most current.
  133.  
  134. --------
  135.  
  136. Q1-6. Asteroids runs too fast
  137.  
  138. A. Asteroids does not run too fast.
  139.  
  140. There were two versions of Asteroids produced - a 1MHZ and 1.5MHZ version.
  141. The most common are the 1.5MHZ versions (which yeilds 60fps), and that is
  142. what Retrocade defaults to. They were not different ROM revisions, only a
  143. master clock divider chip on the board that was modified to make the game
  144. run faster.
  145.  
  146. See Q12 below for how to change the speed at which it plays if you're
  147. too much of a wimp to play the faster version. ;-)
  148.  
  149. --------
  150.  
  151. Q1-7. How can I alter the speed that a game is playing?
  152.  
  153. A. Bring up the onscreen display with the ` key (you know, like Quake!).
  154. Scroll through the options with the up/down arrow keys until you get to the
  155. "Frames Per Second" display. Use the left/right arrow keys to adjust the
  156. game's speed. This can be done while the game is paused or is playing. Hit
  157. the ` key to drop the onscreen display.
  158.  
  159. --------
  160.  
  161. Q1-8. Where do I stick the ROM images?
  162.  
  163. A. Wherever you'd like!
  164.  
  165. + In the current subdirectory where Retrocade's executable is
  166. + In the ./roms subdirectory off of where Retrocade's executable is
  167. + In an user defined subdirectories specified by -romdir
  168.  
  169. If you have a common ROM subdirectory, specify -romdir c:\romdir (or
  170. wherever) to indicate where your ROMs are. There is no need to reissue
  171. this command more than once. It is sticky, and is stored in Retrocade's
  172. registry.
  173.  
  174. You can also issue -romdir c:\romdir;d:\games\roms;e:\blah .... to search
  175. each subdirectory for more ROM images. Multiple ROM paths are supported.
  176.  
  177. --------
  178.  
  179. Q1-9. Where do I stick the .PAK files?
  180.  
  181. A. One of two places:
  182.  
  183. + In the current subdirectory where Retrocade's executable is
  184. + In the ./paks subdirectory off of where Retrocade's executable is
  185.  
  186. --------
  187.  
  188. Q1-10. I've modified my defctrls.ini file to make changes to the emulator's
  189.        assignments, but nothing changes when I try the altered game again.
  190.  
  191. A. Aha! You assume too much from the great defctrls.ini file!
  192.  
  193. The defctrls.ini file is only read when you run a game for the first time
  194. (hence the name, DEFault ConTRoLs). After that, it pulls all settings out
  195. of the registry, which is where your controller assignments are stored.
  196.  
  197. If you want to load your new default configuration, then use Retrocade's
  198. GUI to load up your controller configuration for that game.
  199.  
  200. --------
  201.  
  202. Q1-11. I'm really offended by the splash screen. How can I get rid of it?
  203.  
  204. A. We're very sorry you're offended by a fully-clothed woman. Use the 
  205. -splash off option to keep her from popping up. If you use -splash off,
  206. she will not appear again. -splash on Will reenable it.
  207.  
  208. --------
  209.  
  210. Q1-12. How can I get screeshots of my game in progress?
  211.  
  212. A. Hit printscreen! You will get filenames like astdelu0.jpg, and other
  213. various abbreviations for the other games as well. It uses the ZIP filename
  214. as a basis for naming these, and sequentially replaces the rightmost
  215. major part of the filename with numbers. They will be placed in the /scrnshot
  216. subdirectory where your Retrocade executable was launched from.
  217.  
  218. --------
  219.  
  220. Q1-13. What do the fields in the performance monitor actually mean?
  221.  
  222. A. Various things:
  223.  
  224. Cpu Emu:
  225.  
  226. This indicates the percentage of time spent in the processor emulators of
  227. the various games.
  228.  
  229. Render :
  230.  
  231. With Raster games, this is the percentage of time Retrocade is spending
  232. updating the offscreen backbuffer. With vector games, this is the percentage
  233. of time spent traversing the vector generator engines and creating a
  234. linelist.
  235.  
  236. Blit   :
  237.  
  238. This is the percentage of time that Retrocade is spending transferring the
  239. offscreen image to the video card itself. In vector games, this is the time
  240. spent in the linedraw routines actually drawing/erasing the lines. NOTE:
  241. When you have -vsync on, you'll notice your blit percentage go through the
  242. roof. This is because when you are sync'd to vertical retrace, the speed
  243. control is throttled to the update rate of the video card. The transfer of
  244. of the offscreen image to the video card itself is done only during vertical
  245. retrace and it must wait until it is complete before it can transfer the
  246. image.
  247.  
  248. Idle   :
  249.  
  250. Percentage of time Retrocade is spent waiting at the system timer to allow
  251. the next frame to be generated.
  252.  
  253. Don't be alarmed if it says 100% idle. Retrocade does statistical sampling
  254. at an even pace as to where it spends its time. It does this at a rate of
  255. twice your game's framerate. If less than 40% of the overall processor is
  256. being used, then you will see 100% idle because the sampling rate is just
  257. not fast enough to grab the statistical samples. We could increase the
  258. sample rate, but it would slow emulation down significantly. Besides, it's
  259. only really meaningful when things are not running as fast as you'd expect,
  260. right?
  261.  
  262. --------
  263.  
  264. Q1-14. Why don't you provide a way to have a smaller sampling rate to increase
  265.        game emulation speed?
  266.  
  267. A. In Retrocade's case the sound engine is efficient enough that a lower
  268. sampling rate across all games has a miniscule effect on performance, and
  269. thusly we decided not to bother enabling lower sampling rates.
  270.  
  271. --------
  272.  
  273. Q1-15. I want to use my own sample files with Retrocade. Can I do that?
  274.  
  275. A. No. The samples that are within the .PAK files are specially treated
  276. samples. They come from a source of 16 bit samples, all at 44.1khz and
  277. require that the zero crosspoints and loop points be set. This is not a
  278. trivial process.
  279.  
  280. However, if you have good quality samples (44.1khz, 16 bit, and *CLEAN* -
  281. not distorted or overdriven) that you would like us to include in games
  282. that use them, contact the Retrocade Alliance and we'll work with you to
  283. get them added.
  284.  
  285. --------
  286.  
  287. Q1-16. Why doesn't game 'x' save my high scores?
  288.  
  289. A. Because game 'x' doesn't have high score saving abilities, or you've
  290. deleted the hiscores.reg file, or the game itself does not have a high
  291. score saving ability (Cinematronics games for example).
  292.  
  293. --------
  294.  
  295. Q1-17. Retrocade shows the correct fps, but the game is running too fast.
  296.  
  297. A. The first question is do *ALL* games run too fast? If not, then it could
  298. be that you're starting the game on a higher level (Star Wars, for example,
  299. on Medium and Hard will run the games faster than if you choose Normal).
  300.  
  301. Did you bump the frames per second accidentally in the onscreen display?
  302. Hit ` and scroll through the options using the up and down arrows. The
  303. correct (original) rate of the game will be shown in parenthesis.
  304.  
  305. It's possible that we've botched the framerate of a given game. If you think
  306. so, let the Retrocade alliance know the game you have an issue with and
  307. a rate that "feels" better. We've been known to make mistakes, since some of
  308. us don't have access to these games to compare.
  309.  
  310. Another thing - If you're running DOSRetro, don't run under Windows to get
  311. accurate timing. The virtualized nature of timers and such (that Retrocade
  312. relies on to throttle correctly) will cause Retrocade to give you inaccurate
  313. results speed-wise.
  314.  
  315. If all games are running too fast, you may have shut off speed throttling.
  316. Hit F6 to turn it back on again.
  317.  
  318. --------
  319.  
  320. Q1-18. Why doesn't Retrocade support all ROM revisions of a particular game?
  321.  
  322. A. That's not Retrocade's focus. It's to get the most "playable" versions
  323. of the games. Besides, the ROM revision differences are usually not
  324. something that the end user would even notice, so we don't bother with doing
  325. it.
  326.  
  327. --------
  328.  
  329. Q1-19. Wouldn't it be better/faster to break Retrocade up into smaller programs?
  330.  
  331. A. No. This is a common misconception. Just because an executable gets
  332. bigger doesn't mean it will run slower. You might have seen other emulators
  333. get bigger and slower, but not only was the size changing, the internal
  334. main execution code was changing as well, which is the entire reason things
  335. got slower.
  336.  
  337. Breaking up the executable would also make it more difficult to maintain.
  338. And besides, Retrocade is designed to be an all-in-one style of emulator
  339. anyway, and would go against its goal. It is also designed with performance
  340. in mind, so it will not suffer from progressive slowness from release to
  341. release.
  342.  
  343. In other words, bad idea.
  344.  
  345. --------
  346.  
  347. Q1-20. Why are the games that use antialiasing and translucent vectors so much
  348.        slower than the rest? Why am I getting flicker?
  349.  
  350. A. This is a very good question, and I'm glad you asked, though the answer
  351. is very long and involved. Now would be a good time to go get a beverage
  352. of your choice:
  353.  
  354. I want to illustrate just what the linedraw code must go through to be able
  355. to do regular, antialiased, translucent, and translucent/antialiased lines. 
  356. I have taken a sampling of each of the linedraw code for the different modes.
  357. What I have exceprted is the routine which does nothing more than set the
  358. pixel and advance the pointer. If you know something about programming, you'll
  359. understand right away. If not, then you should be able to glean how much is
  360. required to do these modes by the sheer size of the code.
  361.  
  362. First, this is the main loop for a regular piece of linedraw code:
  363.  
  364. alignymSkip20:
  365.         mov    [ds:edi], ax    ; Store our full strength pixel
  366.         sub    edi, esi    ; Move back!
  367.         add    bp, bx    ; Add our slope value
  368.         jnc    nocarryov120
  369.         add    edi, edx    ; Advance Y coordinate
  370. nocarryov120:
  371.  
  372. That's it. Only 5 lines of code to do a regular single-thickness pixel
  373. linedraw. Now, let's try the translucent vector only code:
  374.  
  375. alignaSkip220:
  376.         mov    ax, [ds:edi]    ; Get our source data
  377.         mov    edx, eax    ; Get our color
  378.         and    eax, 007ffh    ; 16bpp - no red
  379.         and    edx, 0f800h    ; 16bpp - Just red
  380.         add    edx, [colorred]    ; Add in our red color band
  381.         test    edx, 0ffff0000h    ; Did we overflow red?
  382.         jz    noRedOv21    ; Nope!
  383.         mov    edx, 0f800h    ; Red full
  384. noRedOv21:
  385.  
  386.         or    eax, edx    ; Put it back in with the color tuple
  387.         mov    edx, eax    ; Get our color
  388.         and    eax, 0f81fh    ; 16bpp - no green
  389.         and    edx, 007e0h    ; 16bpp - Just green
  390.         add    dx, [colorgreen]    ; Add in our green color band
  391.         test    edx, 0fffff800h    ; Did we overflow green?
  392.         jz    noGreenOv21    ; Nope!
  393.         mov    edx, 007e0h    ; Green full
  394. noGreenOv21:
  395.  
  396.         or    eax, edx    ; Put it back in with the color
  397. tuple
  398.         mov    edx, eax    ; Get our color
  399.         and    eax, 0ffe0h    ; 16bpp - no blue
  400.         and    edx, 0001fh    ; 15 or 16bpp - Just blue
  401.         add    dx, [colorblue]    ; Add in our blue color band
  402.         test    edx, 0ffffffe0h    ; Did we overflow green?
  403.         jz    noblueOv21    ; Nope!
  404.         mov    edx, 001fh    ; blue full
  405. noblueOv21:
  406.         mov    [ds:edi], ax    ; Store our translucent pixel
  407.         sub    edi, [x_sign]    ; Move back!
  408.         add    bp, bx    ; Add our slope value
  409.         jnc    nocarryov210
  410.         add    edi, [x_sign]    ; To our video surface
  411. nocarryov210:
  412.  
  413. Jumped from 5 lines to 30 lines. Lots more expensive. Remember, that this
  414. is on a *PER PIXEL* basis. Also note that transluscency is reading from
  415. the video memory to get good looking translucent vectors. This is a slow
  416. process, since arbitrary line angles (Which this code handles) are not
  417. sequential in memory, so no bursts can take place. Now that things
  418. are starting to get a bit tougher, let's take a look at the antialiased 
  419. only code:
  420.  
  421. alignymSkip20:
  422.         mov    ax, [color]
  423.         mov    edx, ebp    ; Get our weighting
  424.         shl    ebp, 16    ; Save our weighting count for later
  425.         mov    bp, dx    ; Get our weighting back!
  426.         and    bp, 0f000h    ; Only the upper nibble matters
  427.         shr    bp, 1
  428.         mov    edx, eax
  429.         and    eax, 007ffh    ; 16bpp - no red
  430.         and    edx, 0f800h    ; 16bpp - Just red
  431.         sub    dx, bp    ; Sutract it!
  432.         jnc    noredaaov0    ; Nope!
  433.         xor    edx, edx    ; Screw that!
  434. noredaaov0:
  435.         or    eax, edx    ; OR Our color back in!
  436.         mov    edx, eax
  437.         shr    bp, 5        ; Shift 5 for 16bpp
  438.         and    eax, 0f81fh    ; 16bpp - no green
  439.         and    edx, 007e0h    ; 16bpp - Just green
  440.         sub    dx, bp    ; Sutract it!
  441.         jnc    nogreenaaov0 ; Nope!
  442.         xor    edx, edx    ; Screw that!
  443. nogreenaaov0:
  444.         or    eax, edx    ; OR Our color back in!
  445.         mov    edx, eax
  446.         shr    bp, 6        ; Shift 6
  447.         and    eax, 0ffe0h    ; No blue
  448.         and    edx, 0001fh    ; Just blue
  449.         sub    dx, bp    ; Sutract it!
  450.         jnc    noblueaaov0 ; Nope!
  451.         xor    edx, edx    ; Screw that!
  452. noblueaaov0:
  453.         or    eax, edx    ; OR Our color back in!
  454.         shr    ebp, 16    ; Restore our weighting
  455.         mov    [ds:edi], ax    ; Store our full strength pixel
  456.         add    edi, [x_sign]    ; Move over pixel!
  457.         mov    ax, [color]
  458.         mov    edx, ebp    ; Get our weighting
  459.         shl    ebp, 16    ; Save our weighting count for later
  460.         mov    bp, dx    ; Get our weighting back!
  461.         mov    dx, 00014h    ; Get our base
  462.         shr    bp, 12    ; Lower byte
  463.         sub    dx, bp    ; Subtract our weight
  464.         shl    dx, 11    ; Back to our position!
  465.         mov    bp, dx    ; And make it our weight target
  466.         mov    edx, eax
  467.         and    eax, 007ffh    ; 16bpp - no red
  468.         and    edx, 0f800h    ; 16bpp - Just red
  469.         sub    dx, bp    ; Sutract it!
  470.         jnc    noredaaov1    ; Nope!
  471.         xor    edx, edx    ; Screw that!
  472. noredaaov1:
  473.         or    eax, edx    ; OR Our color back in!
  474.         mov    edx, eax
  475.         shr    bp, 5        ; Shift 5 for 16bpp
  476.         and    eax, 0f81fh    ; 16bpp - no green
  477.         and    edx, 007e0h    ; 16bpp - Just green
  478.         sub    dx, bp    ; Sutract it!
  479.         jnc    nogreenaaov1 ; Nope!
  480.         xor    edx, edx    ; Screw that!
  481. nogreenaaov1:
  482.         or    eax, edx    ; OR Our color back in!
  483.         mov    edx, eax
  484.         shr    bp, 6        ; Shift 6
  485.         and    eax, 0ffe0h    ; No blue
  486.         and    edx, 0001fh    ; Just blue
  487.         sub    dx, bp    ; Sutract it!
  488.         jnc    noblueaaov1 ; Nope!
  489.         xor    edx, edx    ; Screw that!
  490. noblueaaov1:
  491.         or    eax, edx    ; OR Our color back in!
  492.         shr    ebp, 16    ; Restore our weighting
  493.         mov    [ds:edi], ax    ; Store our antialiased pixel
  494.         sub    edi, [x_sign]    ; Move back!
  495.         add    bp, bx    ; Add our slope value
  496.         jnc    nocarryov120
  497.         add    esi, [x_sign]    ; Add our X throw
  498.         add    edi, [x_sign]    ; To our back surface, too
  499. nocarryov120:
  500.  
  501. Gee - that one is getting a bit hairier, eh? 70 Lines of assembly
  502. instead of 5! The 16bpp 5-6-5 red/green blue gradients must be broken
  503. out, added, checked for overflow, and fixed up if so, then put back in
  504. the original position. Of course, the antialiased routine above does
  505. TWO pixels, but that's the nature if Antialiased lines - you need
  506. to do two pixels - one that's full strength and one that's the halftone.
  507.  
  508. Now we meet the monster of all monsters. The antialiased/translucent
  509. vector routines. Keep in mind that this is the *DEFAULT* mode for games
  510. with backdrops:
  511.  
  512. alignymSkip180:
  513.         mov    ax, [color]
  514.         mov    [step], ebx    ; Save our step size back
  515.         mov    bx, [edi]    ; Get our current pixel
  516.         mov    dx, bx
  517.         shl    ebx, 16
  518.         mov    bx, dx
  519.         mov    edx, ebp    ; Get our weighting
  520.         shl    ebp, 16    ; Save our weighting count for later
  521.         mov    bp, dx    ; Get our weighting back!
  522.         and    bp, 0f000h    ; Only the upper nibble matters
  523.         shr    bp, 1
  524.         mov    edx, eax
  525.         and    eax, 007ffh    ; 16bpp - no red
  526.         and    edx, 0f800h    ; 16bpp - Just red
  527.         and    bx, 0f800h    ; 16bpp - Just red
  528.         sub    dx, bp    ; Sutract it!
  529.         jnc    noredaaov8    ; Nope!
  530.         xor    edx, edx    ; Screw that!
  531. noredaaov8:
  532.         add    dx, bx    ; Add in our red color band
  533.         jnc    noRedaatvOv16    ; No overflow
  534.         mov    edx, 0f800h    ; Red full
  535. noRedaatvOv16:
  536.  
  537.         and    edx, 0f800h    ; Red full
  538.         or    eax, edx    ; OR Our color back in!
  539.         mov    edx, ebx
  540.         shr    edx, 16
  541.         mov    bx, dx
  542.         mov    edx, eax
  543.         shr    bp, 5        ; Shift 5 for 16bpp
  544.         and    eax, 0f81fh    ; 16bpp - no green
  545.         and    edx, 007e0h    ; 16bpp - Just green
  546.         and    bx, 007e0h    ; 16bpp - Just green
  547.         sub    dx, bp    ; Sutract it!
  548.         jnc    nogreenaaov8 ; Nope!
  549.         xor    edx, edx    ; Screw that!
  550. nogreenaaov8:
  551.         add    dx, bx    ; Add in our red color band
  552.         test    dx, 0f800h    ; Did we overflow green?
  553.         jz    noGreenOv16    ; Nope!
  554.         mov    edx, 007e0h    ; Green full
  555. noGreenOv16:
  556.  
  557.         or    eax, edx    ; Put it back in with the color
  558. tuple
  559.         shr    ebx, 16
  560.         and    ebx, 01fh
  561.         mov    edx, eax
  562.         shr    bp, 6        ; Shift 6
  563.         and    eax, 0ffe0h    ; No blue
  564.         and    edx, 0001fh    ; Just blue
  565.         sub    dx, bp    ; Sutract it!
  566.         jnc    noblueaaov8 ; Nope!
  567.         xor    edx, edx    ; Screw that!
  568. noblueaaov8:
  569.         and    edx, 01fh    ; Only the blue gradient
  570.         and    eax, 0ffe0h    ; 16bpp - no blue
  571.         add    dx, bx    ; Add in our blue color band
  572.         test    edx, 0ffffffe0h    ; Did we overflow blue?
  573.         jz    noblueOv16    ; Nope!
  574.         mov    edx, 001fh    ; blue full
  575. noblueOv16:
  576.  
  577.         or    eax, edx    ; OR Our color back in!
  578.         shr    ebp, 16    ; Restore our weighting
  579.         mov    [ds:edi], ax    ; Store our full strength pixel
  580.         add    edi, [x_sign]    ; Move over pixel!
  581.         mov    ax, [color]
  582.         mov    bx, [edi]    ; Get our current pixel
  583.         mov    dx, bx
  584.         shl    ebx, 16
  585.         mov    bx, dx
  586.         mov    edx, ebp    ; Get our weighting
  587.         shl    ebp, 16    ; Save our weighting count for later
  588.         mov    bp, dx    ; Get our weighting back!
  589.         mov    dx, 00014h    ; Get our base
  590.         shr    bp, 12    ; Lower byte
  591.         sub    dx, bp    ; Subtract our weight
  592.         shl    dx, 11    ; Back to our position!
  593.         mov    bp, dx    ; And make it our weight target
  594.         mov    edx, eax
  595.         and    eax, 007ffh    ; 16bpp - no red
  596.         and    edx, 0f800h    ; 16bpp - Just red
  597.         and    bx, 0f800h    ; 16bpp - Just red
  598.         sub    dx, bp    ; Sutract it!
  599.         jnc    noredaaov9    ; Nope!
  600.         xor    edx, edx    ; Screw that!
  601. noredaaov9:
  602.         add    dx, bx    ; Add in our red color band
  603.         jnc    noRedaatvOv17    ; No overflow
  604.         mov    edx, 0f800h    ; Red full
  605. noRedaatvOv17:
  606.  
  607.         and    edx, 0f800h    ; Red full
  608.         or    eax, edx    ; OR Our color back in!
  609.         mov    edx, ebx
  610.         shr    edx, 16
  611.         mov    bx, dx
  612.         mov    edx, eax
  613.         shr    bp, 5        ; Shift 5 for 16bpp
  614.         and    eax, 0f81fh    ; 16bpp - no green
  615.         and    edx, 007e0h    ; 16bpp - Just green
  616.         and    bx, 007e0h    ; 16bpp - Just green
  617.         sub    dx, bp    ; Sutract it!
  618.         jnc    nogreenaaov9 ; Nope!
  619.         xor    edx, edx    ; Screw that!
  620. nogreenaaov9:
  621.         add    dx, bx    ; Add in our red color band
  622.         test    dx, 0f800h    ; Did we overflow green?
  623.         jz    noGreenOv17    ; Nope!
  624.         mov    edx, 007e0h    ; Green full
  625. noGreenOv17:
  626.  
  627.         or    eax, edx    ; Put it back in with the color
  628. tuple
  629.         shr    ebx, 16
  630.         and    ebx, 01fh
  631.         mov    edx, eax
  632.         shr    bp, 6        ; Shift 6
  633.         and    eax, 0ffe0h    ; No blue
  634.         and    edx, 0001fh    ; Just blue
  635.         sub    dx, bp    ; Sutract it!
  636.         jnc    noblueaaov9 ; Nope!
  637.         xor    edx, edx    ; Screw that!
  638. noblueaaov9:
  639.         and    edx, 01fh    ; Only the blue gradient
  640.         and    eax, 0ffe0h    ; 16bpp - no blue
  641.         add    dx, bx    ; Add in our blue color band
  642.         test    edx, 0ffffffe0h    ; Did we overflow blue?
  643.         jz    noblueOv17    ; Nope!
  644.         mov    edx, 001fh    ; blue full
  645. noblueOv17:
  646.  
  647.         or    eax, edx    ; OR Our color back in!
  648.         shr    ebp, 16    ; Restore our weighting
  649.         mov    [ds:edi], ax    ; Store our antialiased pixel
  650.         mov    ebx, [step]    ; Get our step size back
  651.         sub    edi, [x_sign]    ; Move back!
  652.         add    bp, bx    ; Add our slope value
  653.         jnc    nocarryov1180
  654.         add    esi, [x_sign]    ; Add our X throw
  655.         add    edi, [x_sign]    ; To our back surface, too
  656. nocarryov1180:
  657.  
  658. Wow! That's a bit over 120 lines of assembly code on a *PER PIXEL* basis!
  659. The aa/tv linedraw code above is roughly 30 times slower (including the
  660. PCI overhead) than the regular linedraw code at the beginning of this
  661. message.
  662.  
  663. And this isn't crappy compiler-output code (compiler output is MUCH worse)
  664. It's reasonably well optimized assembly.
  665.  
  666. Also, consider that translucent vector lines must be erased and redrawn
  667. every single frame, whereas in the antialiased or regular linedraw modes,
  668. they only need to be erased if they have moved from the last frame.
  669.  
  670. The bottom line is, antialaiasing is an expensive process CPU-wise.
  671. translucent vectors are not quite as expensive CPU-wise, but are very
  672. expensive PCI-bus wise. When you combine the horrors of antialiasing
  673. and the expensive PCI-bus reads to video memory, it gets many times slower
  674. and that's why you see flicker in some cases.
  675.  
  676. We're currently using a dirty linelist and a video card backbuffer to
  677. be able to keep things steady. If your card does not support more than 1
  678. video page at a given resolution, then God help you. Any modern card with
  679. a megabyte or more of RAM will have 2 or more pages available, so I'm
  680. suspecting that this is not the problem. All vector games with backdrops
  681. default to 640x480 @ 16 bits per pixel, which winds up using about 1.2
  682. megabytes of RAM.
  683.  
  684. And no, using a memory buffer and blitting dirty tiles will not help
  685. performance - it will hinder it - especially when things get busy. Already
  686. tried this approach.
  687.  
  688. Retrocade is clocked to the system timer, and will update the vectors at its
  689. rate. The problem with this is that the video card may not be synchronized
  690. with the system timer, and you'll get updates during the middle of a vertical
  691. retrace, and you see flicker. Some cards will wait until the retrace is
  692. complete before flipping the page and you won't have this problem, but a
  693. good number don't. That's when you should use the -vsync option. This will
  694. synchronize the updates to the vertical blanking period. If you still get
  695. flicker after using this option, then you need more CPU horsepower to be
  696. able to eliminate it. Either that, or shut off transluscency with the -notv
  697. option.
  698.  
  699. We're currently looking at using MMX to handle the color gradient saturation
  700. to help improve performance.
  701.  
  702. So when you run games with these kinds of features on your P90 and they
  703. don't perform well or flicker, don't be disgusted that you have to disable
  704. transluscency or antialiased vectors to get flicker free performance.
  705.  
  706. --------
  707.  
  708. Q1-21. Why I can't turn the brightness all the way down to black?
  709.  
  710. A. Because people fuss with the brightness controls sometimes, forget they've
  711. turned them down all the way, and then complain that a given game gives them
  712. a black screen. This prevents that from happening.
  713.  
  714. Besides, are you really going to be playing a game with the brightness
  715. turned all the way down? We think not.
  716.  
  717. --------
  718.  
  719. Q1-22. What are the minimum requirements for all games to run full speed with
  720.        Retrocade?
  721.  
  722. A. A Pentium 133 (non-MMX is fine) with 32MB of RAM, and a good PCI video
  723. card that natively supports VESA 2.x or higher. A Pentium 166 is required
  724. if your video card does not support VESA 2.x or higher. A good video card
  725. would be an ATI or a Matrox board, *NOT* A Cirrus Logic or Trident card
  726. (both are poor performers).
  727.  
  728. --------
  729.  
  730. Q1-23. Why can't I set the FPS lower than 20?
  731.  
  732. A. Because the timer chip under DOS cannot go lower than 20fps accurately.
  733. It slows all games down to unplayability at that rate. 
  734.  
  735. --------
  736.  
  737. Q1-24. What is Retrocade's purpose?
  738.  
  739. A. High performance emulation, ease of use. It is designed to be an end-user
  740. product for people to play. Retrocade's goal is not to emulate every game
  741. under the sun, but the games that are desirable to most end users. All
  742. Retrocade developers have different areas of interest with regard to games.
  743. We can be influenced. ;-)
  744.  
  745. --------
  746.  
  747. Q1-25. Why did you choose JPG over GIF or some other format for screenshots?
  748.  
  749. A. Several reasons:
  750.  
  751. + JPG Supports more than 256 colors
  752. + JPG Is a file format that is widely used/accepted in the internet
  753.   community (very common to have screenshots on web pages, right?)
  754. + JPG's File format is free
  755. + JPG Is supported by even the most primitive web browsers
  756.  
  757. --------
  758.  
  759. Q1-26. The Williams games (Bubbles, Stargate, etc...) just sit there looking
  760.        at me with "Factory settings restored" on the screen and won't start.
  761.        What do I do to get it to go?
  762.  
  763. A. Providing you haven't remapped the keys, hit F8. This is mapped to the
  764. "Advance" button on the Williams hardware. The original games required you
  765. to hit this button the first time you powered it up with a clear CMOS.
  766.  
  767. ---------
  768.  
  769. Q1-27. I'd like to squish/expand the vector games - especially Tempest. Is this
  770.        possible?
  771.  
  772. A. Yes. Start up any vector game. Hit the ` key to bring up the onscreen
  773. display. Scroll through the options with the up/down arrow keys. You'll
  774. eventually find the Vector X/Y size and Vector X/Y position. Use the left
  775. and right arrow keys to adjust any of the settings, and hit home to put it
  776. back to its default. This is set on a per-game basis and is remembered from
  777. game to game.
  778.  
  779. ----------
  780.  
  781. Q1-28. I want to modify the in-game "system" controls to my own custom settings.
  782.        How can I do this?
  783.  
  784. A. Provided with Retrocade is a cabinet.ini file that looks like this:
  785.  
  786. =========================
  787.  
  788. ;
  789. ; Cabinet mode controller init file. BE CAREFUL! If you screw this up, you
  790. ; may not be able to get out of Retrocade at all!
  791. ;
  792.  
  793. Performance = (key_f5)
  794. Throttle     = (key_f6)
  795. GuiReturn     = (key_esc)
  796. Pause         = (key_pause)
  797. Exit1         = (key_pause + key_leftctrl)
  798. Exit2         = (key_pause + key_rightctrl)
  799. Screenshot     = (key_printscreen)
  800. Record1     = (key_printscreen + key_leftctrl)
  801. Record2     = (key_printscreen + key_rightctrl)
  802. Save1         = (key_printscreen + key_leftshift)
  803. Save2         = (key_printscreen + key_rightshift)
  804. GuiF1         = (key_f1)
  805. GuiF2         = (key_f2)
  806. GuiF3         = (key_f3)
  807. GuiF4         = (key_f4)
  808. Hue         = (key_f8)
  809. Reset1         = (key_f12 + key_leftctrl + key_leftalt)
  810. Reset2         = (key_f12 + key_rightctrl + key_rightalt)
  811.  
  812. =========================
  813.  
  814. You can remap any function to be any definition. This is read at startup,
  815. and is designed so you can put Retrocade inside a custom cabinet. The UI
  816. has not been fully cabnet-ized, so you'll only be able to do limited work
  817. in the UI.
  818.  
  819. ----------
  820.  
  821. Q1-29. Does Retrocade support multiple ROM pathnames? I have my ROMs in several
  822.        different subdirectories.
  823.  
  824. A. Yes. Use "-romdir c:\dir1;d:\dir2;e:\dir3", etc.... This is sticky, so
  825. you won't have to reissue it each time.
  826.  
  827. ----------
  828.  
  829. Q1-30. I get [CTRL=Failed] each time I try to start Retrocade. Why?
  830.  
  831. A. Either you have a missing defctrls.ini file or there's a syntax error
  832. in it. Snag the file from the standard archive again.
  833.  
  834. ----------
  835.  
  836. Q1-31. Game 'x' doesn't work properly with my Gamepad. What's wrong?
  837.  
  838. A. Retrocade defaults all games to work with an analog joystick. A gamepad
  839. appears as both an analog and digital joystick to Retrocade, and the two
  840. controls override eachother - depending upon what is defined.
  841.  
  842. For each game that you're having trouble, go into the controller setup
  843. section and turn off the axis controllers being controlled by the joysticks.
  844. That will make everything work nicely.
  845.  
  846. ----------
  847.  
  848. Q1-32. I get an assertion in games.c when I try to run Retrocade 1.0 after I
  849.        have run Retrocade 1.1.
  850.  
  851. A. You're probably trying to run the old Retrocade 1.0 on a newer RETRO.REG
  852. file. Retrocade is not reverse compatible - only forward compatible. You
  853. cannot run Retrocade 1.0 with registries created by 1.1. However, your 1.0
  854. registry will be migrated to 1.1. New games will be added, and new controls
  855. will be set up for those games.
  856.  
  857. --------
  858.  
  859. Q2-1. Why can't I get any backdrops with any of the games that support it?
  860.  
  861. A. It depends.
  862.  
  863. First off, make sure you've downloaded the appropriate .PAK file and placed
  864. it either in Retrocade's directory, or in the ./paks directory one level 
  865. below the Retrocade directory. 
  866.  
  867. Secondly, make sure that the game you're trying to play really does have a
  868. backdrop or an overlay.
  869.  
  870. Lastly, if you are running any of the vector games and aren't getting
  871. backdrops when you think you should, most likely your video card does not
  872. support 16 bit per pixel mode, or does not have access to the linear
  873. framebuffer. If you have a VESA 1.x compliant card, you will not have
  874. a linear framebuffer, and all graphics operations will need to be paged.
  875. Retrocade never supports backdrops in 8 bit per pixel modes, and supports
  876. backdrops/overlays in 16 bit per pixel mode only if your card has linear
  877. framebuffer access.
  878.  
  879. A possible solution to this problem is to get a copy of Scitech Display
  880. Doctor to enable this functionality in your card (www.scitechsoft.com).
  881.  
  882. --------
  883.  
  884. Q2-2. I get no sound in *ANY* games. Why?
  885.  
  886. A. Do you have a Sound Blaster Pro (or better) in your machine? Retrocade
  887. requires that you have a Sound Blaster Pro (or better/compatible).
  888.  
  889. Is there a BLASTER= environment variable set? If not, Retrocade cannot find
  890. your sound card.
  891.  
  892. Is the interrupt set higher than IRQ 7? If so, Retrocade will not function,
  893. as DOS4GW will not handle interrupts higher than IRQ 7. Other DOS extenders
  894. that DO support higher interrupts have been tried with varying success.
  895. DOS4GW Is by far the most stable.
  896.  
  897. Are you certain that the game you're trying to run really does have sound?
  898. If not, you will get silence. Some of the games we have either not gotten
  899. the samples for or sound just hasn't been added.
  900.  
  901. If all else fails, and you think you should be getting sound but aren't,
  902. add the -log command to Retrocade when you start it and run your game, play
  903. it for a few moments, and exit. It will create a game.txt file. Send that
  904. file (zipped, please) to the Retrocade alliance.
  905.  
  906. --------
  907.  
  908.  
  909. Q2-3. I get a black screen whenever I try to run any game in Retrocade, or the
  910.       machine locks up.
  911.  
  912. A. Wow. Real bad!
  913.  
  914. If you're running under Windows, reboot into DOS mode and try it again. Some
  915. video card VXDs that provide VESA support are problematic, and the VESA
  916. support may be buggy.
  917.  
  918. If you get the same results under straight DOS, add the -log command line
  919. option to the Retrocade executable so that it will generate a game.txt file
  920. and log debugging information. Send this file (zipped, please) to the
  921. Retrocade alliance for examiniation. Also note the kind of video card you
  922. have.
  923.  
  924. --------
  925.  
  926. Q2-4. Is Retrocade (DOS) supposed to be able to run under Windows?
  927.  
  928. A. A cautious "yes". We've found that Retrocade runs fine under Windows on
  929. a myriad of machines. However (and a *BIG* however):
  930.  
  931. Many problems can arise from running under Windows. Joystick control may
  932. be erratic, games may not run at totally proper speeds, some video modes
  933. will not be available, sound might not be available, certain controllers
  934. will not work properly (Wingman Warrior spinner for example), and other
  935. potentially oddities. Windows is an ugly world where there's no guarantees
  936. that two "identical" installations will work the same. Windows virtualizes
  937. quite a few things for DOS programs, such as interrupts, timers, and
  938. controller support. The reports may come in erratically and cause flaky
  939. and inaccurate operation under Windows.
  940.  
  941. So the official stance is that if it works OK in DOS, but doesn't in Windows,
  942. we're sorry, but RetroDOS is not officially supported under Windows.
  943.  
  944. However, if you're experiencing system lockups, protection faults, or other
  945. crashing uglies, please invoke Retrocade with the -log option, zip up the
  946. game.txt file it generates, and mail it to the Retrocade alliance for
  947. examiniation. Retrocade should not crash under Windows - only certain options
  948. should not work or work erratically.
  949.  
  950. --------
  951.  
  952. Q2-5. Retrocade doesn't see my mouse/Wingman Warrior. Why?
  953.  
  954. A. Do you have a mouse driver loaded? The best way to tell is to do a mem /c
  955. at a DOS prompt. If you're running in a DOS box under Windows and your
  956. mouse works OK there, then a mouse driver is not needed. If you are running
  957. under straight DOS and get no mouse support, make sure you have a mouse
  958. driver loaded.
  959.  
  960. In the case of the Wingman Warrior, you must have the Logitech driver
  961. that supports the Wingman Warrior and the mouse, and it must be invoked
  962. with the DUAL option so that they both work.
  963.  
  964. --------
  965.  
  966. Q2-6. The onscreen display does not come up at all when I hit F5. Why?
  967.  
  968. A. You're running a vector game, right? The onscreen display requires the 
  969. presence of a linear framebuffer to work. If you do not have VESA 2.x or
  970. higher, you will not get a linear framebuffer. A linear framebuffer is not
  971. required for raster games, and thusly will always work.
  972.  
  973. --------
  974.  
  975. Q2-7. Retrocade isn't as fast as everyone makes it out to be on my machine, but
  976.       everyone else seems to be having great success. Why is my machine slower
  977.       than people with equivalent or lesser powered machines?
  978.  
  979. A. It's a tough question to answer accurately in all cases, but slowness can
  980. be attributed mostly to cards that do not have native VESA 2.x compliancy.
  981. The only solution there is to either get a different video card or use
  982. Scitech Display Doctor to enable linear framebuffering with VESA 2.x.
  983.  
  984. The second thing is the size of your system's cache, especially with 68000/
  985. 68010 games since the code breadth is fairly wide. 256K Cache is OK, but
  986. 512K cache or bigger will do *MUCH* better. Most systems today come with
  987. 512K cahce on them already.
  988.  
  989. Thirdly, are you running under Windows? That can knock performance down by
  990. 5-10%, and even more if you have other applications running. Hit F5 during
  991. a game (and unthrottle it with F6) and watch where Retrocade is spending
  992. most of its time. High percentages in the Blit category indicate video
  993. card bottleneck issues.
  994.  
  995. --------
  996.  
  997. Q2-8. Retrocade crashes almost immediately on startup with "Loading..." with
  998. a general proection fault. What's wrong?
  999.  
  1000. A. We've found on a few machines that EMM386.EXE gets in the way of PCI
  1001. read/writes, which Retrocade needs to do to implement a workaround for
  1002. buggy Riva 128 VESA BIOSes. The only known workaround to this is to get rid
  1003. of EMM386.EXE entirely. It's really not necessary when running under Windows.
  1004.  
  1005. --------
  1006.  
  1007. Q2-9. My Logitech Wingman Warrior spinner doesn't work, but the Wingman itself
  1008.       works just fine.
  1009.  
  1010. A. Running under Windows, are we?
  1011.  
  1012. You can thank Logitech for this one. The mouse VXD for the Wingman Warrior
  1013. does not support the spinner when event callbacks are used (Retrocade uses
  1014. callbacks for mouse & Wingman Warrior support since it's much cleaner and
  1015. requires no host CPU power unless the controller is moving). Logitech has
  1016. not fixed this problem. I've contacted them, and they are unwilling to
  1017. fix it.
  1018.  
  1019. There is no workaround except to load the DOS device driver under straight
  1020. DOS and use it.
  1021.  
  1022. --------
  1023.  
  1024. Q2-10. What video card(s) do you recommend for Retrocade for a PC?
  1025.  
  1026. A. We've had excellent luck with the ATI series, starting with the Pro 
  1027. Turbo PC/2TV board through the Xpert @ Work and Xpert @ Play. All cards are
  1028. excellent performers, and work great right out of the box, and are also
  1029. compatible with all of the tweaked video modes.
  1030.  
  1031. Other beta testers have reported that the Matrox G200 is also an excellent
  1032. choice, in addition to the Riva TNT based boards.
  1033.  
  1034. ---------
  1035.  
  1036. Q2-11. My Microsoft Sidewinder Gamepad doesn't work when I'm running Retrocade
  1037.        in a DOS box under Windows. Why not?
  1038.  
  1039. A. As stated before, Retrocade/DOS is not designed to run under Windows,
  1040. and problems like this will crop up.
  1041.  
  1042. Retrocade talks directly to the game port to get Sidewinder Gamepad
  1043. information. Having the Sidewinder gamepad drivers installed under Windows
  1044. will cause collisions between Retrocade's polling routines and the Windows
  1045. driver for the Sidewinder. There is no workaround to this, other than to
  1046. uninstall your Sidewinder Gamepad drivers from Windows or run it in straight
  1047. DOS mode.
  1048.  
  1049. ---------
  1050.  
  1051. Q2-12. I get "Unable to copy screen contents into clipboard" whenever I try to
  1052.        get a screenshot.
  1053.  
  1054. A. Windows is trapping your printscreen key. To get around the problem:
  1055.  
  1056. + Create a shortcut to the Retrocade executable
  1057. + Right click on the shortcut
  1058. + Click on properties
  1059. + Click on the "misc" tab
  1060. + Unclick PrtSc, Alt+PrtSc, and Alt+Space
  1061. + Click Apply
  1062. + Click OK
  1063.  
  1064. Just double click on the icon to start up Retrocade, and this problem will
  1065. not occur.
  1066.  
  1067. ----------
  1068.  
  1069. Q2-13. Does Retrocade support scanlines?
  1070.  
  1071. A. Thanks to Nicola Salmoria from the MAME team, yes, Retrocade supports
  1072. scanlines. You can either enable them from within the UI (which will require
  1073. a restart of Retrocade) or you can enable them on the command line with the
  1074. "-scanlines on" option. This is sticky.
  1075.  
  1076. Only 224x288, 288x224 and 256x256 scanlined video modes are supported. You
  1077. will not get scanlines in any other resolution.
  1078.  
  1079. ----------
  1080.  
  1081. Q2-14. Why can't Retrocade deal with interrupts higher than IRQ 7?
  1082.  
  1083. A. It's a limitation of the DOS extender that Retrocade uses - *NOT*
  1084. Retrocade itself.
  1085.  
  1086.